function chroms=generate_neigh(chrom,neigh_size,total_op_num)
global   num_job;
chroms=[];
flag=0;
tau=randi([1,2]);  
for i=1:neigh_size
    job=randperm(num_job,tau);  
    job_ind=zeros(1,tau);  
    for j=1:tau
        temp=find(chrom(1:total_op_num)==job(j));
        jj=randperm(length(temp),1);%(num_op(job(tau)),1);
        job_ind(j)=temp(jj);
    end
    ind=perms(1:tau);
    for j=1:length(ind)
        chrom1=chrom;
        chrom1(job_ind)=job(ind(j,:));
        tempss=chrom(1:total_op_num);
        tempdd=zeros(total_op_num,1);
       
        for k=1:total_op_num
            tempind=find(tempss==chrom1(k));
            tempdd(k)=tempind(1);
            tempss(tempind(1))=0;
        end
        tempind=chrom(total_op_num+1:total_op_num*2);
        chrom1(total_op_num+1:total_op_num*2)=tempind(tempdd);
        tempind=chrom(total_op_num*2+1:end);
        chrom1(total_op_num*2+1:end)=tempind(tempdd);
        chroms=[chroms;chrom1];
        if size(chroms,1)>=neigh_size
            flag=1;
            break;
        end
    end
    if flag==1
        break;
    end
end
end